package cc.rengu.igas.bomp.facade.enums;

/**
 * @author: zhangxuran
 * @Date: 2020/5/8 9:47
 * @Description: 图片上传的类型
 */
public enum BompImageUploadTypeEnum {

    MCHNT_IMAGE("00", "商户入驻映像", "MCHNT_IMAGE"),
    CREDIT_REPORT("01", "征信报告", "CREDIT_REPORT"),
    MCHNT_INSPECT("02", "商户巡检映像", "MCHNT_INSPECT"),
    QRCODE_LOGO("03", "二维码Logo", "QRCODE_LOGO"),
    QRCODE_MODE("04", "二维码模板", "QRCODE_MODE"),
    MARKING_ADVERT("05", "营销广告图片", "MARKING_ADVERT"),
    TRANS_VOUCHER("06", "交易凭证映像", "TRANS_VOUCHER"),
    USER_HEAD_IMAGE("07", "用户映像", "USER_HEAD_IMAGE"),
    BANK_LOGO("08", "银行logo", "BANK_LOGO"),
    REAL_NAME_QRCODE("09", "实名认证商户确认二维码", "REAL_NAME_QRCODE"),
    PLAT_MCHNT_LOGO("10", "平台商户LOGO", "PLAT_MCHNT_LOGO"),
    ;
    private String imageType;

    private String desc;

    private String imagePathKey;

    public String getImageType() {
        return imageType;
    }

    public String getDesc() {
        return desc;
    }

    public String getImagePathKey() {
        return imagePathKey;
    }

    BompImageUploadTypeEnum(String imageType, String desc, String imagePathKey) {
        this.imageType = imageType;
        this.desc = desc;
        this.imagePathKey = imagePathKey;
    }

    public static BompImageUploadTypeEnum getBompImageUploadTypeEnumByImageType(String imageType) {
        if (null == imageType || "".equals(imageType)) {
            return null;
        }


        for (BompImageUploadTypeEnum imageTypeEnum : BompImageUploadTypeEnum.values()) {
            if (imageTypeEnum.getImageType().equals(imageType)) {
                return imageTypeEnum;
            }
        }

        return null;
    }

}
